3.5.66 \(\int \sec ^3(c+d x) (a+b \sec (c+d x))^3 \, dx\) [466]

Optimal. Leaf size=189 \[ \frac {a \left (4 a^2+9 b^2\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}-\frac {\left (3 a^4-52 a^2 b^2-16 b^4\right ) \tan (c+d x)}{30 b d}-\frac {a \left (6 a^2-71 b^2\right ) \sec (c+d x) \tan (c+d x)}{120 d}-\frac {\left (3 a^2-16 b^2\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{60 b d}-\frac {a (a+b \sec (c+d x))^3 \tan (c+d x)}{20 b d}+\frac {(a+b \sec (c+d x))^4 \tan (c+d x)}{5 b d} \]

[Out]

1/8*a*(4*a^2+9*b^2)*arctanh(sin(d*x+c))/d-1/30*(3*a^4-52*a^2*b^2-16*b^4)*tan(d*x+c)/b/d-1/120*a*(6*a^2-71*b^2)
*sec(d*x+c)*tan(d*x+c)/d-1/60*(3*a^2-16*b^2)*(a+b*sec(d*x+c))^2*tan(d*x+c)/b/d-1/20*a*(a+b*sec(d*x+c))^3*tan(d
*x+c)/b/d+1/5*(a+b*sec(d*x+c))^4*tan(d*x+c)/b/d

________________________________________________________________________________________

Rubi [A]
time = 0.22, antiderivative size = 189, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3925, 4087, 4082, 3872, 3855, 3852, 8} \begin {gather*} \frac {a \left (4 a^2+9 b^2\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}-\frac {\left (3 a^2-16 b^2\right ) \tan (c+d x) (a+b \sec (c+d x))^2}{60 b d}-\frac {a \left (6 a^2-71 b^2\right ) \tan (c+d x) \sec (c+d x)}{120 d}-\frac {\left (3 a^4-52 a^2 b^2-16 b^4\right ) \tan (c+d x)}{30 b d}+\frac {\tan (c+d x) (a+b \sec (c+d x))^4}{5 b d}-\frac {a \tan (c+d x) (a+b \sec (c+d x))^3}{20 b d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^3*(a + b*Sec[c + d*x])^3,x]

[Out]

(a*(4*a^2 + 9*b^2)*ArcTanh[Sin[c + d*x]])/(8*d) - ((3*a^4 - 52*a^2*b^2 - 16*b^4)*Tan[c + d*x])/(30*b*d) - (a*(
6*a^2 - 71*b^2)*Sec[c + d*x]*Tan[c + d*x])/(120*d) - ((3*a^2 - 16*b^2)*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(6
0*b*d) - (a*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(20*b*d) + ((a + b*Sec[c + d*x])^4*Tan[c + d*x])/(5*b*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3872

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rule 3925

Int[csc[(e_.) + (f_.)*(x_)]^3*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[(-Cot[e + f*x])*(
(a + b*Csc[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Dist[1/(b*(m + 2)), Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m*
(b*(m + 1) - a*Csc[e + f*x]), x], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2 - b^2, 0] &&  !LtQ[m, -1]

Rule 4082

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))*(csc[(e_.) + (f_.)*(x_)]*(B_.
) + (A_)), x_Symbol] :> Simp[(-b)*B*Cot[e + f*x]*((d*Csc[e + f*x])^n/(f*(n + 1))), x] + Dist[1/(n + 1), Int[(d
*Csc[e + f*x])^n*Simp[A*a*(n + 1) + B*b*n + (A*b + B*a)*(n + 1)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e,
 f, A, B}, x] && NeQ[A*b - a*B, 0] &&  !LeQ[n, -1]

Rule 4087

Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_))
, x_Symbol] :> Simp[(-B)*Cot[e + f*x]*((a + b*Csc[e + f*x])^m/(f*(m + 1))), x] + Dist[1/(m + 1), Int[Csc[e + f
*x]*(a + b*Csc[e + f*x])^(m - 1)*Simp[b*B*m + a*A*(m + 1) + (a*B*m + A*b*(m + 1))*Csc[e + f*x], x], x], x] /;
FreeQ[{a, b, A, B, e, f}, x] && NeQ[A*b - a*B, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0]

Rubi steps

\begin {align*} \int \sec ^3(c+d x) (a+b \sec (c+d x))^3 \, dx &=\frac {(a+b \sec (c+d x))^4 \tan (c+d x)}{5 b d}+\frac {\int \sec (c+d x) (4 b-a \sec (c+d x)) (a+b \sec (c+d x))^3 \, dx}{5 b}\\ &=-\frac {a (a+b \sec (c+d x))^3 \tan (c+d x)}{20 b d}+\frac {(a+b \sec (c+d x))^4 \tan (c+d x)}{5 b d}+\frac {\int \sec (c+d x) (a+b \sec (c+d x))^2 \left (13 a b-\left (3 a^2-16 b^2\right ) \sec (c+d x)\right ) \, dx}{20 b}\\ &=-\frac {\left (3 a^2-16 b^2\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{60 b d}-\frac {a (a+b \sec (c+d x))^3 \tan (c+d x)}{20 b d}+\frac {(a+b \sec (c+d x))^4 \tan (c+d x)}{5 b d}+\frac {\int \sec (c+d x) (a+b \sec (c+d x)) \left (b \left (33 a^2+32 b^2\right )-a \left (6 a^2-71 b^2\right ) \sec (c+d x)\right ) \, dx}{60 b}\\ &=-\frac {a \left (6 a^2-71 b^2\right ) \sec (c+d x) \tan (c+d x)}{120 d}-\frac {\left (3 a^2-16 b^2\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{60 b d}-\frac {a (a+b \sec (c+d x))^3 \tan (c+d x)}{20 b d}+\frac {(a+b \sec (c+d x))^4 \tan (c+d x)}{5 b d}+\frac {\int \sec (c+d x) \left (15 a b \left (4 a^2+9 b^2\right )-4 \left (3 a^4-52 a^2 b^2-16 b^4\right ) \sec (c+d x)\right ) \, dx}{120 b}\\ &=-\frac {a \left (6 a^2-71 b^2\right ) \sec (c+d x) \tan (c+d x)}{120 d}-\frac {\left (3 a^2-16 b^2\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{60 b d}-\frac {a (a+b \sec (c+d x))^3 \tan (c+d x)}{20 b d}+\frac {(a+b \sec (c+d x))^4 \tan (c+d x)}{5 b d}+\frac {1}{8} \left (a \left (4 a^2+9 b^2\right )\right ) \int \sec (c+d x) \, dx-\frac {\left (3 a^4-52 a^2 b^2-16 b^4\right ) \int \sec ^2(c+d x) \, dx}{30 b}\\ &=\frac {a \left (4 a^2+9 b^2\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}-\frac {a \left (6 a^2-71 b^2\right ) \sec (c+d x) \tan (c+d x)}{120 d}-\frac {\left (3 a^2-16 b^2\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{60 b d}-\frac {a (a+b \sec (c+d x))^3 \tan (c+d x)}{20 b d}+\frac {(a+b \sec (c+d x))^4 \tan (c+d x)}{5 b d}+\frac {\left (3 a^4-52 a^2 b^2-16 b^4\right ) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{30 b d}\\ &=\frac {a \left (4 a^2+9 b^2\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}-\frac {\left (3 a^4-52 a^2 b^2-16 b^4\right ) \tan (c+d x)}{30 b d}-\frac {a \left (6 a^2-71 b^2\right ) \sec (c+d x) \tan (c+d x)}{120 d}-\frac {\left (3 a^2-16 b^2\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{60 b d}-\frac {a (a+b \sec (c+d x))^3 \tan (c+d x)}{20 b d}+\frac {(a+b \sec (c+d x))^4 \tan (c+d x)}{5 b d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.91, size = 120, normalized size = 0.63 \begin {gather*} \frac {15 a \left (4 a^2+9 b^2\right ) \tanh ^{-1}(\sin (c+d x))+\tan (c+d x) \left (15 a \left (4 a^2+9 b^2\right ) \sec (c+d x)+90 a b^2 \sec ^3(c+d x)+8 b \left (15 \left (3 a^2+b^2\right )+5 \left (3 a^2+2 b^2\right ) \tan ^2(c+d x)+3 b^2 \tan ^4(c+d x)\right )\right )}{120 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^3*(a + b*Sec[c + d*x])^3,x]

[Out]

(15*a*(4*a^2 + 9*b^2)*ArcTanh[Sin[c + d*x]] + Tan[c + d*x]*(15*a*(4*a^2 + 9*b^2)*Sec[c + d*x] + 90*a*b^2*Sec[c
 + d*x]^3 + 8*b*(15*(3*a^2 + b^2) + 5*(3*a^2 + 2*b^2)*Tan[c + d*x]^2 + 3*b^2*Tan[c + d*x]^4)))/(120*d)

________________________________________________________________________________________

Maple [A]
time = 0.12, size = 148, normalized size = 0.78

method result size
derivativedivides \(\frac {a^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-3 b \,a^{2} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+3 b^{2} a \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )-b^{3} \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )}{d}\) \(148\)
default \(\frac {a^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-3 b \,a^{2} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+3 b^{2} a \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )-b^{3} \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )}{d}\) \(148\)
norman \(\frac {\frac {\left (4 a^{3}-24 b \,a^{2}+15 b^{2} a -8 b^{3}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {\left (4 a^{3}+24 b \,a^{2}+15 b^{2} a +8 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}-\frac {\left (12 a^{3}-96 b \,a^{2}+9 b^{2} a -16 b^{3}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}+\frac {\left (12 a^{3}+96 b \,a^{2}+9 b^{2} a +16 b^{3}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}-\frac {4 b \left (75 a^{2}+29 b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15 d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{5}}-\frac {a \left (4 a^{2}+9 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {a \left (4 a^{2}+9 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) \(259\)
risch \(-\frac {i \left (60 a^{3} {\mathrm e}^{9 i \left (d x +c \right )}+135 a \,b^{2} {\mathrm e}^{9 i \left (d x +c \right )}+120 a^{3} {\mathrm e}^{7 i \left (d x +c \right )}+630 a \,b^{2} {\mathrm e}^{7 i \left (d x +c \right )}-720 a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}-1680 b \,a^{2} {\mathrm e}^{4 i \left (d x +c \right )}-640 b^{3} {\mathrm e}^{4 i \left (d x +c \right )}-120 a^{3} {\mathrm e}^{3 i \left (d x +c \right )}-630 a \,b^{2} {\mathrm e}^{3 i \left (d x +c \right )}-1200 a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}-320 b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-60 a^{3} {\mathrm e}^{i \left (d x +c \right )}-135 b^{2} a \,{\mathrm e}^{i \left (d x +c \right )}-240 b \,a^{2}-64 b^{3}\right )}{60 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 d}-\frac {9 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{2}}{8 d}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 d}+\frac {9 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{2}}{8 d}\) \(308\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^3*(a+b*sec(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

1/d*(a^3*(1/2*sec(d*x+c)*tan(d*x+c)+1/2*ln(sec(d*x+c)+tan(d*x+c)))-3*b*a^2*(-2/3-1/3*sec(d*x+c)^2)*tan(d*x+c)+
3*b^2*a*(-(-1/4*sec(d*x+c)^3-3/8*sec(d*x+c))*tan(d*x+c)+3/8*ln(sec(d*x+c)+tan(d*x+c)))-b^3*(-8/15-1/5*sec(d*x+
c)^4-4/15*sec(d*x+c)^2)*tan(d*x+c))

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 181, normalized size = 0.96 \begin {gather*} \frac {240 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a^{2} b + 16 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} b^{3} - 45 \, a b^{2} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 60 \, a^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{240 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3*(a+b*sec(d*x+c))^3,x, algorithm="maxima")

[Out]

1/240*(240*(tan(d*x + c)^3 + 3*tan(d*x + c))*a^2*b + 16*(3*tan(d*x + c)^5 + 10*tan(d*x + c)^3 + 15*tan(d*x + c
))*b^3 - 45*a*b^2*(2*(3*sin(d*x + c)^3 - 5*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1) - 3*log(sin(d
*x + c) + 1) + 3*log(sin(d*x + c) - 1)) - 60*a^3*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1)
+ log(sin(d*x + c) - 1)))/d

________________________________________________________________________________________

Fricas [A]
time = 2.24, size = 170, normalized size = 0.90 \begin {gather*} \frac {15 \, {\left (4 \, a^{3} + 9 \, a b^{2}\right )} \cos \left (d x + c\right )^{5} \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \, {\left (4 \, a^{3} + 9 \, a b^{2}\right )} \cos \left (d x + c\right )^{5} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (16 \, {\left (15 \, a^{2} b + 4 \, b^{3}\right )} \cos \left (d x + c\right )^{4} + 90 \, a b^{2} \cos \left (d x + c\right ) + 15 \, {\left (4 \, a^{3} + 9 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} + 24 \, b^{3} + 8 \, {\left (15 \, a^{2} b + 4 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{240 \, d \cos \left (d x + c\right )^{5}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3*(a+b*sec(d*x+c))^3,x, algorithm="fricas")

[Out]

1/240*(15*(4*a^3 + 9*a*b^2)*cos(d*x + c)^5*log(sin(d*x + c) + 1) - 15*(4*a^3 + 9*a*b^2)*cos(d*x + c)^5*log(-si
n(d*x + c) + 1) + 2*(16*(15*a^2*b + 4*b^3)*cos(d*x + c)^4 + 90*a*b^2*cos(d*x + c) + 15*(4*a^3 + 9*a*b^2)*cos(d
*x + c)^3 + 24*b^3 + 8*(15*a^2*b + 4*b^3)*cos(d*x + c)^2)*sin(d*x + c))/(d*cos(d*x + c)^5)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sec {\left (c + d x \right )}\right )^{3} \sec ^{3}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**3*(a+b*sec(d*x+c))**3,x)

[Out]

Integral((a + b*sec(c + d*x))**3*sec(c + d*x)**3, x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 367 vs. \(2 (177) = 354\).
time = 0.49, size = 367, normalized size = 1.94 \begin {gather*} \frac {15 \, {\left (4 \, a^{3} + 9 \, a b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 15 \, {\left (4 \, a^{3} + 9 \, a b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (60 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 360 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 225 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 120 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 120 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 960 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 90 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 160 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 1200 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 464 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 120 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 960 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 90 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 160 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 60 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 360 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 225 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 120 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{5}}}{120 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3*(a+b*sec(d*x+c))^3,x, algorithm="giac")

[Out]

1/120*(15*(4*a^3 + 9*a*b^2)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 15*(4*a^3 + 9*a*b^2)*log(abs(tan(1/2*d*x + 1/
2*c) - 1)) + 2*(60*a^3*tan(1/2*d*x + 1/2*c)^9 - 360*a^2*b*tan(1/2*d*x + 1/2*c)^9 + 225*a*b^2*tan(1/2*d*x + 1/2
*c)^9 - 120*b^3*tan(1/2*d*x + 1/2*c)^9 - 120*a^3*tan(1/2*d*x + 1/2*c)^7 + 960*a^2*b*tan(1/2*d*x + 1/2*c)^7 - 9
0*a*b^2*tan(1/2*d*x + 1/2*c)^7 + 160*b^3*tan(1/2*d*x + 1/2*c)^7 - 1200*a^2*b*tan(1/2*d*x + 1/2*c)^5 - 464*b^3*
tan(1/2*d*x + 1/2*c)^5 + 120*a^3*tan(1/2*d*x + 1/2*c)^3 + 960*a^2*b*tan(1/2*d*x + 1/2*c)^3 + 90*a*b^2*tan(1/2*
d*x + 1/2*c)^3 + 160*b^3*tan(1/2*d*x + 1/2*c)^3 - 60*a^3*tan(1/2*d*x + 1/2*c) - 360*a^2*b*tan(1/2*d*x + 1/2*c)
 - 225*a*b^2*tan(1/2*d*x + 1/2*c) - 120*b^3*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^5)/d

________________________________________________________________________________________

Mupad [B]
time = 4.77, size = 258, normalized size = 1.37 \begin {gather*} \frac {\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (a^3+\frac {9\,a\,b^2}{4}\right )}{d}-\frac {\left (-a^3+6\,a^2\,b-\frac {15\,a\,b^2}{4}+2\,b^3\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (2\,a^3-16\,a^2\,b+\frac {3\,a\,b^2}{2}-\frac {8\,b^3}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (20\,a^2\,b+\frac {116\,b^3}{15}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-2\,a^3-16\,a^2\,b-\frac {3\,a\,b^2}{2}-\frac {8\,b^3}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (a^3+6\,a^2\,b+\frac {15\,a\,b^2}{4}+2\,b^3\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/cos(c + d*x))^3/cos(c + d*x)^3,x)

[Out]

(atanh(tan(c/2 + (d*x)/2))*((9*a*b^2)/4 + a^3))/d - (tan(c/2 + (d*x)/2)^7*((3*a*b^2)/2 - 16*a^2*b + 2*a^3 - (8
*b^3)/3) - tan(c/2 + (d*x)/2)^3*((3*a*b^2)/2 + 16*a^2*b + 2*a^3 + (8*b^3)/3) + tan(c/2 + (d*x)/2)*((15*a*b^2)/
4 + 6*a^2*b + a^3 + 2*b^3) + tan(c/2 + (d*x)/2)^5*(20*a^2*b + (116*b^3)/15) - tan(c/2 + (d*x)/2)^9*((15*a*b^2)
/4 - 6*a^2*b + a^3 - 2*b^3))/(d*(5*tan(c/2 + (d*x)/2)^2 - 10*tan(c/2 + (d*x)/2)^4 + 10*tan(c/2 + (d*x)/2)^6 -
5*tan(c/2 + (d*x)/2)^8 + tan(c/2 + (d*x)/2)^10 - 1))

________________________________________________________________________________________